/*
 * @Description: 侧边栏
 * @Author: Zzt
 * @Date: 2022-11-27 09:55:52
 * @LastEditTime: 2022-12-05 11:45:19
 */

import { IArchiveType } from '@/interfaces/archiveType';
import { Menu } from 'antd';
import SubMenu from 'antd/lib/menu/SubMenu';
import classNames from 'classnames/bind';
import { useAnnualReportContext } from '../contexts/AnnualReportContext';
import styles from '../styles/siderbar.module.scss';

const cx = classNames.bind(styles);
const Siderbar = () => {
  const { changeSidebar } = useAnnualReportContext();
  const onSelect = ({ key, atList }: { key: string; atList?: IArchiveType[] }): void => {
    changeSidebar(key);
    console.log('key&atList', key, atList);
  };
  return (
    <>
      <div className={cx('container')}>
        <h6 className={cx('fond-header')}>年报类型</h6>
        <div className={cx('fond-navs')}>
          <Menu
            mode="inline"
            onSelect={onSelect}
            style={{ width: 200 }}
            defaultSelectedKeys={['all']}
          >
            <Menu.Item key={'all'}>全部</Menu.Item>
            <Menu.Item key={1}>档基表</Menu.Item>
            <Menu.Item key={2}>档综表</Menu.Item>
          </Menu>
        </div>
      </div>
    </>
  );
};
export default Siderbar;
